<?php

class ActionError extends BaseAction
{
    public function  __construct($controller, $id)
    {
        $oContent = false;

        if(($error = Yii::app()->errorHandler->error))
        {
            switch ($error['code'])
            {
                case 404:
                    $this->pageId = 'error404';
                break;

                case 403:
                    $this->pageId = 'error403';
                break;
            }
        }

        parent::__construct($controller, $id);
    }
}